Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Gus Minjumimanetsi 22.Oct.03 03:19 PM a Web browser
Domino Designer 6.0.2 CF2 All Platforms


Agent, Error cleaning up agent threads...
I have this agent which is calling an EJB.It works fine the first time ..when it exits out it gives me an error "Error cleaning up agent threads".I have checked for active threads before exiting out..
I am using Domino6.02 and WAS5.

import lotus.domino.*;
import hennepin.co.srt.ITGroup;
import hennepin.co.srt.SRTHelper;
import hennepin.co.srt.SRTHelperHome;

import java.rmi.RemoteException;
import java.sql.SQLException;
import java.util.Properties;

import javax.ejb.CreateException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import com.ibm.websphere.naming.WsnInitialContextFactory;
import com.ibm.websphere.naming.*;
import javax.naming.*;
import java.util.Hashtable;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// out("Printing property: " + System.getProperties()); //ty("java.class.path"));
testEJB();
} catch(Exception e) {
e.printStackTrace();
}
}

/**
* Creates connection to testEJB and executes
* a method on the ejb
*/
public void testEJB() {
out("Entered testEJB method");
com.ibm.websphere.naming.WsnInitialContextFactory f = new com.ibm.websphere.naming.WsnInitialContextFactory();
out("after com.ibm.websphere.naming.WsnInitialContextFactory;");
Properties prop = new Properties();
prop.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory" );
prop.put("java.naming.provider.url", "iiop://....");

Hashtable ht2=new Hashtable();
ht2.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory" );
ht2.put("java.naming.provider.url", "iiop://....");

try {
// Get a naming context
out("before getting context");
javax.naming.InitialContext initialContext = new javax.naming.InitialContext(ht2);
out("got initial context");
// Get a reference to Bean
Object obj = initialContext.lookup("/lookup....");
out("looked up SRTHelper");
SRTHelperHome srtHelperHome = (SRTHelperHome)
javax.rmi.PortableRemoteObject.narrow(obj, SRTHelperHome.class);
out("got srtHelperHome");
// Create an Posting object from the Home interface
SRTHelper srtHelper = srtHelperHome.create();
out("got srtHelper");
// call the authenticate method
ITGroup itGroup = srtHelper.getGroups();
out("got group");

try {
for (int i = 0; ; i++) {
out("unit number: " + itGroup.getUNIT_NO(i));
out("unit name: " + itGroup.getUNIT_NM(i));
}
} catch (Exception e) {
}
} catch (RemoteException e) {
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
} catch (CreateException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}

}
public void out(String s) {
System.out.println(s);
}

}






Java agent ans WAS5 (~Gus Minjumiman... 22.Oct.03)
. . RE: Java agent ans WAS5 eom> (~Bella Asaresab... 22.Oct.03)
. . RE: Java agent ans WAS5 (~Sean Rehipiter... 27.Oct.03)
. . . . RE: Java agent ans WAS5 (~Bella Asaresab... 27.Oct.03)
. . . . . . RE: Java agent ans WAS5 (~Dana Prejipyve... 26.Nov.03)
. . . . . . RE: Java agent ans WAS5 (~Sean Rehipiter... 28.Oct.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS